package com.koro.config;

import com.koro.tool.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TaskJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {



        log.info("=========================业务逻辑====================");
        log.info("jobName:{}", context.getJobDetail().getKey().getName());
        log.info("jobGroup:{}", context.getJobDetail().getKey().getGroup());
        log.info("triggerName:{}", context.getTrigger().getKey().getName());
        log.info("triggerGroup:{}", context.getTrigger().getKey().getGroup());
        log.info("上次触发时间:{}", DateUtils.formatDateTime(context.getPreviousFireTime()));
        log.info("本次触发时间:{}", DateUtils.formatDateTime(context.getFireTime()));
        log.info("下次触发时间:{}", DateUtils.formatDateTime(context.getNextFireTime()));
        log.info("调度时间:{}", DateUtils.formatDateTime(context.getScheduledFireTime()));
    }
}

